package com.tmxk.day01.lifeng.demo4;
/**
 * Cat   静态特征(属性)昵称   年龄  种类  形状  动态行为(方法)
 * @author 19256
 *
 */
public class Cat extends Pet{
	private String color;
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public Cat() {
	}
	public Cat(String name) {
		//super();
		super.setName(name);
	}
	public Cat(String name, int age, String strain, String color) {
		super(name,age,strain);
		this.color = color;
	}
	/**
	 * 叫的方法
	 */
	public void shout() {
		System.out.println(super.getName() + "在喵喵的叫");
	}
	/**
	 * 捉老鼠方法
	 */
	public void cathMice() {
		System.out.println( super.getName()+ "天天捉老鼠");
	}
	public void showInfo() {
		System.out.println("宠物的基本信息: 昵称是:" + super.getName() +" ,年龄是: " + super.getAge() + 
				" ,种类是: " + super.getStrain() + ",颜色是:" +this.color);
	}
}
